import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('../views/AboutView.vue'),
    children: [
        {
          alias: '/about',
          path: '/kind',
          component: () => import("../components/KindView.vue")
        },
        {
          path: '/brand',
          component: () => import("../components/BrandView.vue")
        }
      ]
  },
  {
    path: '/book',
    name: 'book',
    component: () => import( '../views/BookView.vue')
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import( '../views/CartView.vue')
  },
  {
    path: '/ours',
    name: 'ours',
    component: () => import( '../views/OursView.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
